import React, {
  Component
} from 'react';

export class TodoItem extends Component {
  constructor(props) {
    super(props)
    this.handleDel = this.handleDel.bind(this)
  }
  handleDel() {
    const {
      handleDelete,
      index
    } = this.props;
    handleDelete(index)
    // this.props.handleDelete(this.props.index)
  }
  render() {
    return ( <
      div onClick = {
        this.handleDel.bind(this)
      } > {
        this.props.content
      } <
      /div>
    );
  }
}

export default TodoItem;